Rename all settings schemas to avoid conflict
authorMatthias Clasen <mclasen@redhat.com>
Tue, 2 Apr 2019 19:22:48 +0000 (19:22 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 2 Apr 2019 19:27:34 +0000 (19:27 +0000)
Rename all our settings schemas to the org.gtk.gtk4
prefix to avoid conflicting with the gtk3 schemas.

13 files changed:
gtk/gtkcolorchooserwidget.c
gtk/gtkemojichooser.c
gtk/gtkfilechooserutils.c
gtk/gtkwindow.c
gtk/meson.build
gtk/org.gtk.Settings.ColorChooser.gschema.xml [deleted file]
gtk/org.gtk.Settings.Debug4.gschema.xml [deleted file]
gtk/org.gtk.Settings.EmojiChooser.gschema.xml [deleted file]
gtk/org.gtk.Settings.FileChooser.gschema.xml [deleted file]
gtk/org.gtk.gtk4.Settings.ColorChooser.gschema.xml [new file with mode: 0644]
gtk/org.gtk.gtk4.Settings.Debug.gschema.xml [new file with mode: 0644]
gtk/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml [new file with mode: 0644]
gtk/org.gtk.gtk4.Settings.FileChooser.gschema.xml [new file with mode: 0644]

index 8ba5df0d17696cc9120fb5fd3ecf158a0afdf99a..24598b370e280e0eb71cb3bc3ee922b36b1b66b0 100644 (file)
@@ -551,7 +551,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
   gtk_color_swatch_set_selectable (GTK_COLOR_SWATCH (button), FALSE);
   gtk_container_add (GTK_CONTAINER (box), button);
 
-  cc->priv->settings = g_settings_new ("org.gtk.Settings.ColorChooser");
+  cc->priv->settings = g_settings_new ("org.gtk.gtk4.Settings.ColorChooser");
   variant = g_settings_get_value (cc->priv->settings, I_("custom-colors"));
   g_variant_iter_init (&iter, variant);
   i = 0;
index 26fdfb3584d87b45c00522a4556fbe09e2edd000..17822e8b9000e5689df32d427165b252e119b2bd 100644 (file)
@@ -609,7 +609,7 @@ gtk_emoji_chooser_init (GtkEmojiChooser *chooser)
   GtkAdjustment *adj;
   GtkText *text;
 
-  chooser->settings = g_settings_new ("org.gtk.Settings.EmojiChooser");
+  chooser->settings = g_settings_new ("org.gtk.gtk4.Settings.EmojiChooser");
 
   gtk_widget_init_template (GTK_WIDGET (chooser));
 
index 7965ab0f20b379f05681b5192e07551350672cee..3d89ab601214f9fb801097b59cd1b5100aa7d66d 100644 (file)
@@ -455,7 +455,7 @@ _gtk_file_chooser_get_settings_for_widget (GtkWidget *widget)
 
   if (G_UNLIKELY (settings == NULL))
     {
-      settings = g_settings_new ("org.gtk.Settings.FileChooser");
+      settings = g_settings_new ("org.gtk.gtk4.Settings.FileChooser");
       g_settings_delay (settings);
 
       g_object_set_qdata_full (G_OBJECT (gtksettings),
index 6b6e9148ca2eb545cb9a7f7f054ce65b2cee1d64..650eac6c3b2f9d7b2b3530e99228b2de2d461b9c 100644 (file)
@@ -9733,7 +9733,7 @@ inspector_keybinding_enabled (gboolean *warn)
   *warn = FALSE;
 
   schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (),
-                                            "org.gtk.Settings.Debug4",
+                                            "org.gtk.gtk4.Settings.Debug",
                                             TRUE);
 
   if (schema)
@@ -9755,7 +9755,7 @@ set_warn_again (gboolean warn)
   GSettings *settings;
 
   schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (),
-                                            "org.gtk.Settings.Debug4",
+                                            "org.gtk.gtk4.Settings.Debug",
                                             TRUE);
 
   if (schema)
index 9ec10acd9a0e3de267a79c82aa748178cd897c0d..36615fdbd14ce4e58e6097b3549f646c08bce9d4 100644 (file)
@@ -965,10 +965,10 @@ endif
 gtk_deps += libintl_dep
 
 gtk_settings_schemas = [
-  'org.gtk.Settings.FileChooser.gschema.xml',
-  'org.gtk.Settings.ColorChooser.gschema.xml',
-  'org.gtk.Settings.EmojiChooser.gschema.xml',
-  'org.gtk.Settings.Debug4.gschema.xml',
+  'org.gtk.gtk4.Settings.FileChooser.gschema.xml',
+  'org.gtk.gtk4.Settings.ColorChooser.gschema.xml',
+  'org.gtk.gtk4.Settings.EmojiChooser.gschema.xml',
+  'org.gtk.gtk4.Settings.Debug.gschema.xml',
 ]
 install_data(gtk_settings_schemas, install_dir: gtk_schemasdir)
 gnome.compile_schemas(depend_files: files(gtk_settings_schemas),
diff --git a/gtk/org.gtk.Settings.ColorChooser.gschema.xml b/gtk/org.gtk.Settings.ColorChooser.gschema.xml
deleted file mode 100644 (file)
index 6270d33..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schemalist>
-
-  <schema id='org.gtk.Settings.ColorChooser' path='/org/gtk/settings/color-chooser/'>
-    <key name='custom-colors' type='a(dddd)'>
-      <default>[]</default>
-      <summary>Custom colors</summary>
-      <description>
-        An array of custom colors to show in the color chooser. Each color is
-        specified as a tuple of four doubles, specifying RGBA values between
-        0 and 1.
-      </description>
-    </key>
-    <key name='selected-color' type='(bdddd)'>
-      <default>(false,1.0,1.0,1.0,1.0)</default>
-      <summary>The selected color</summary>
-      <description>
-         The selected color, described as a tuple whose first member is a
-         boolean that is true if a color was selected, and the remaining
-         four members are four doubles, specifying RGBA values between
-         0 and 1.
-      </description>
-    </key>
-  </schema>
-
-</schemalist>
diff --git a/gtk/org.gtk.Settings.Debug4.gschema.xml b/gtk/org.gtk.Settings.Debug4.gschema.xml
deleted file mode 100644 (file)
index 6b8b1c2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schemalist>
-
-  <schema id='org.gtk.Settings.Debug4' path='/org/gtk/settings/debug4/'>
-    <key name='enable-inspector-keybinding' type='b'>
-      <default>false</default>
-      <summary>Enable inspector keybinding</summary>
-      <description>
-        If this setting is true, GTK lets the user open an interactive
-        debugging window with a keybinding. The default shortcuts for
-        the keybinding are Control-Shift-I and Control-Shift-D.
-      </description>
-    </key>
-    <key name='inspector-warning' type='b'>
-      <default>true</default>
-      <summary>Inspector warning</summary>
-      <description>
-        If this setting is true, GTK shows a warning before letting
-        the user use the interactive debugger.
-      </description>
-    </key>
-  </schema>
-
-</schemalist>
-
diff --git a/gtk/org.gtk.Settings.EmojiChooser.gschema.xml b/gtk/org.gtk.Settings.EmojiChooser.gschema.xml
deleted file mode 100644 (file)
index 20e3db4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schemalist>
-
-  <schema id='org.gtk.Settings.EmojiChooser' path='/org/gtk/settings/emoji-chooser/'>
-    <key name='recent-emoji' type='a((auss)u)'>
-      <default>[]</default>
-      <summary>Recently used Emoji</summary>
-      <description>
-        An array of Emoji definitions to show in the Emoji chooser. Each Emoji is
-        specified as an array of codepoints, name and shortname. The extra integer after this
-        pair is the code of the Fitzpatrick modifier to use in place of a 0 in the
-        codepoint array.
-      </description>
-    </key>
-  </schema>
-
-</schemalist>
diff --git a/gtk/org.gtk.Settings.FileChooser.gschema.xml b/gtk/org.gtk.Settings.FileChooser.gschema.xml
deleted file mode 100644 (file)
index c3753f2..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright © 2010 Christian Persch
-
-  This library is free software; you can redistribute it and/or modify
-  it under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1, or (at your option)
-  any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with this library. If not, see <http://www.gnu.org/licenses/>.
--->
-<schemalist>
-
-  <enum id='org.gtk.Settings.FileChooser.LocationMode'>
-    <value nick='path-bar' value='0'/>
-    <value nick='filename-entry' value='1'/>
-  </enum>
-
-  <enum id='org.gtk.Settings.FileChooser.SortColumn'>
-    <value nick='name' value='0'/>
-    <value nick='size' value='1'/>
-    <value nick='modified' value='2'/>
-  </enum>
-
-  <enum id='org.gtk.Settings.FileChooser.SortOrder'>
-    <value nick='ascending' value='0'/>
-    <value nick='descending' value='1'/>
-  </enum>
-
-  <enum id='org.gtk.Settings.FileChooser.StartupMode'>
-    <value nick='recent' value='0'/>
-    <value nick='cwd' value='1'/>
-  </enum>
-
-  <enum id='org.gtk.Settings.FileChooser.ClockFormat'>
-    <value nick='24h' value='0'/>
-    <value nick='12h' value='1'/>
-  </enum>
-
-  <enum id='org.gtk.Settings.FileChooser.DateFormat'>
-    <value nick='regular' value='0'/>
-    <value nick='with-time' value='1'/>
-  </enum>
-
-  <schema id='org.gtk.Settings.FileChooser' path='/org/gtk/settings/file-chooser/'>
-    <key name='last-folder-uri' type='s'>
-      <default>""</default>
-    </key>
-    <key name='location-mode' enum='org.gtk.Settings.FileChooser.LocationMode'>
-      <default>'path-bar'</default>
-      <summary>Location mode</summary>
-      <description>
-       Controls whether the file chooser shows just a path bar, or a visible entry
-        for the filename as well, for the benefit of typing-oriented users. The
-        possible values for these modes are "path-bar" and "filename-entry".
-      </description>
-    </key>
-    <key name='show-hidden' type='b'>
-      <default>false</default>
-      <summary>Show hidden files</summary>
-      <description>
-       Controls whether the file chooser shows hidden files or not.
-      </description>
-    </key>
-    <key type="b" name="sort-directories-first">
-      <default>false</default>
-      <summary>Show folders first</summary>
-      <description>
-        If set to true, then folders are shown before files in the list.
-      </description>
-    </key>
-    <key name='expand-folders' type='b'>
-      <default>false</default>
-      <summary>Expand folders</summary>
-      <description>This key is deprecated; do not use it.</description>
-    </key>
-    <key name='show-size-column' type='b'>
-      <default>true</default>
-      <summary>Show file sizes</summary>
-      <description>
-       Controls whether the file chooser shows a column with file sizes.
-      </description>
-    </key>
-    <key name='sort-column' enum='org.gtk.Settings.FileChooser.SortColumn'>
-      <default>'name'</default>
-      <summary>Sort column</summary>
-      <description>
-       Can be one of "name", "modified", or "size".  It controls
-       which of the columns in the file chooser is used for sorting
-       the list of files.
-      </description>
-    </key>
-    <key name='sort-order' enum='org.gtk.Settings.FileChooser.SortOrder'>
-      <default>'ascending'</default>
-      <summary>Sort order</summary>
-      <description>
-       Can be one of the strings "ascending" or "descending".
-      </description>
-    </key>
-    <key name='window-position' type='(ii)'>
-      <default>(-1, -1)</default>
-      <summary>Window position</summary>
-      <description>
-       The (x, y) coordinates of the upper-left corner of the GtkFileChooserDialog's
-        window.
-      </description>
-    </key>
-    <key name='window-size' type='(ii)'>
-      <default>(-1, -1)</default>
-      <summary>Window size</summary>
-      <description>
-       The size (width, height) of the GtkFileChooserDialog's window, in pixels.
-      </description>
-    </key>
-    <key name='startup-mode' enum='org.gtk.Settings.FileChooser.StartupMode'>
-      <default>'recent'</default>
-      <summary>Startup mode</summary>
-      <description>
-       Either "recent" or "cwd"; controls whether the file chooser
-       starts up showing the list of recently-used files, or the
-       contents of the current working directory.
-      </description>
-    </key>
-    <key name='sidebar-width' type='i'>
-      <default>148</default>
-      <summary>Sidebar width</summary>
-      <description>
-       Width in pixels of the file chooser's places sidebar.
-      </description>
-    </key>
-    <key name="clock-format" enum="org.gtk.Settings.FileChooser.ClockFormat">
-      <default>'24h'</default>
-      <summary>Time format</summary>
-      <description>
-        Whether the time is shown in 24h or 12h format.
-      </description>
-    </key>
-    <key name="date-format" enum="org.gtk.Settings.FileChooser.DateFormat">
-      <default>'regular'</default>
-      <summary>Date format</summary>
-      <description>
-        The amount of detail to show in the Modified column.
-      </description>
-    </key>
-  </schema>
-
-</schemalist>
diff --git a/gtk/org.gtk.gtk4.Settings.ColorChooser.gschema.xml b/gtk/org.gtk.gtk4.Settings.ColorChooser.gschema.xml
new file mode 100644 (file)
index 0000000..bedc703
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+
+  <schema id='org.gtk.gtk4.Settings.ColorChooser' path='/org/gtk/gtk4/settings/color-chooser/'>
+    <key name='custom-colors' type='a(dddd)'>
+      <default>[]</default>
+      <summary>Custom colors</summary>
+      <description>
+        An array of custom colors to show in the color chooser. Each color is
+        specified as a tuple of four doubles, specifying RGBA values between
+        0 and 1.
+      </description>
+    </key>
+    <key name='selected-color' type='(bdddd)'>
+      <default>(false,1.0,1.0,1.0,1.0)</default>
+      <summary>The selected color</summary>
+      <description>
+         The selected color, described as a tuple whose first member is a
+         boolean that is true if a color was selected, and the remaining
+         four members are four doubles, specifying RGBA values between
+         0 and 1.
+      </description>
+    </key>
+  </schema>
+
+</schemalist>
diff --git a/gtk/org.gtk.gtk4.Settings.Debug.gschema.xml b/gtk/org.gtk.gtk4.Settings.Debug.gschema.xml
new file mode 100644 (file)
index 0000000..0f7b4ba
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+
+  <schema id='org.gtk.gtk4.Settings.Debug' path='/org/gtk/gtk4/settings/debug/'>
+    <key name='enable-inspector-keybinding' type='b'>
+      <default>false</default>
+      <summary>Enable inspector keybinding</summary>
+      <description>
+        If this setting is true, GTK lets the user open an interactive
+        debugging window with a keybinding. The default shortcuts for
+        the keybinding are Control-Shift-I and Control-Shift-D.
+      </description>
+    </key>
+    <key name='inspector-warning' type='b'>
+      <default>true</default>
+      <summary>Inspector warning</summary>
+      <description>
+        If this setting is true, GTK shows a warning before letting
+        the user use the interactive debugger.
+      </description>
+    </key>
+  </schema>
+
+</schemalist>
+
diff --git a/gtk/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml b/gtk/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml
new file mode 100644 (file)
index 0000000..1a0191f
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+
+  <schema id='org.gtk.gtk4.Settings.EmojiChooser' path='/org/gtk/gtk4/settings/emoji-chooser/'>
+    <key name='recent-emoji' type='a((auss)u)'>
+      <default>[]</default>
+      <summary>Recently used Emoji</summary>
+      <description>
+        An array of Emoji definitions to show in the Emoji chooser. Each Emoji is
+        specified as an array of codepoints, name and shortname. The extra integer after this
+        pair is the code of the Fitzpatrick modifier to use in place of a 0 in the
+        codepoint array.
+      </description>
+    </key>
+  </schema>
+
+</schemalist>
diff --git a/gtk/org.gtk.gtk4.Settings.FileChooser.gschema.xml b/gtk/org.gtk.gtk4.Settings.FileChooser.gschema.xml
new file mode 100644 (file)
index 0000000..713597a
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright © 2010 Christian Persch
+
+  This library is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this library. If not, see <http://www.gnu.org/licenses/>.
+-->
+<schemalist>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.LocationMode'>
+    <value nick='path-bar' value='0'/>
+    <value nick='filename-entry' value='1'/>
+  </enum>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.SortColumn'>
+    <value nick='name' value='0'/>
+    <value nick='size' value='1'/>
+    <value nick='modified' value='2'/>
+  </enum>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.SortOrder'>
+    <value nick='ascending' value='0'/>
+    <value nick='descending' value='1'/>
+  </enum>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.StartupMode'>
+    <value nick='recent' value='0'/>
+    <value nick='cwd' value='1'/>
+  </enum>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.ClockFormat'>
+    <value nick='24h' value='0'/>
+    <value nick='12h' value='1'/>
+  </enum>
+
+  <enum id='org.gtk.gtk4.Settings.FileChooser.DateFormat'>
+    <value nick='regular' value='0'/>
+    <value nick='with-time' value='1'/>
+  </enum>
+
+  <schema id='org.gtk.gtk4.Settings.FileChooser' path='/org/gtk/gtk4/settings/file-chooser/'>
+    <key name='last-folder-uri' type='s'>
+      <default>""</default>
+    </key>
+    <key name='location-mode' enum='org.gtk.gtk4.Settings.FileChooser.LocationMode'>
+      <default>'path-bar'</default>
+      <summary>Location mode</summary>
+      <description>
+       Controls whether the file chooser shows just a path bar, or a visible entry
+        for the filename as well, for the benefit of typing-oriented users. The
+        possible values for these modes are "path-bar" and "filename-entry".
+      </description>
+    </key>
+    <key name='show-hidden' type='b'>
+      <default>false</default>
+      <summary>Show hidden files</summary>
+      <description>
+       Controls whether the file chooser shows hidden files or not.
+      </description>
+    </key>
+    <key type="b" name="sort-directories-first">
+      <default>false</default>
+      <summary>Show folders first</summary>
+      <description>
+        If set to true, then folders are shown before files in the list.
+      </description>
+    </key>
+    <key name='expand-folders' type='b'>
+      <default>false</default>
+      <summary>Expand folders</summary>
+      <description>This key is deprecated; do not use it.</description>
+    </key>
+    <key name='show-size-column' type='b'>
+      <default>true</default>
+      <summary>Show file sizes</summary>
+      <description>
+       Controls whether the file chooser shows a column with file sizes.
+      </description>
+    </key>
+    <key name='sort-column' enum='org.gtk.gtk4.Settings.FileChooser.SortColumn'>
+      <default>'name'</default>
+      <summary>Sort column</summary>
+      <description>
+       Can be one of "name", "modified", or "size".  It controls
+       which of the columns in the file chooser is used for sorting
+       the list of files.
+      </description>
+    </key>
+    <key name='sort-order' enum='org.gtk.gtk4.Settings.FileChooser.SortOrder'>
+      <default>'ascending'</default>
+      <summary>Sort order</summary>
+      <description>
+       Can be one of the strings "ascending" or "descending".
+      </description>
+    </key>
+    <key name='window-position' type='(ii)'>
+      <default>(-1, -1)</default>
+      <summary>Window position</summary>
+      <description>
+       The (x, y) coordinates of the upper-left corner of the GtkFileChooserDialog's
+        window.
+      </description>
+    </key>
+    <key name='window-size' type='(ii)'>
+      <default>(-1, -1)</default>
+      <summary>Window size</summary>
+      <description>
+       The size (width, height) of the GtkFileChooserDialog's window, in pixels.
+      </description>
+    </key>
+    <key name='startup-mode' enum='org.gtk.gtk4.Settings.FileChooser.StartupMode'>
+      <default>'recent'</default>
+      <summary>Startup mode</summary>
+      <description>
+       Either "recent" or "cwd"; controls whether the file chooser
+       starts up showing the list of recently-used files, or the
+       contents of the current working directory.
+      </description>
+    </key>
+    <key name='sidebar-width' type='i'>
+      <default>148</default>
+      <summary>Sidebar width</summary>
+      <description>
+       Width in pixels of the file chooser's places sidebar.
+      </description>
+    </key>
+    <key name="clock-format" enum="org.gtk.gtk4.Settings.FileChooser.ClockFormat">
+      <default>'24h'</default>
+      <summary>Time format</summary>
+      <description>
+        Whether the time is shown in 24h or 12h format.
+      </description>
+    </key>
+    <key name="date-format" enum="org.gtk.gtk4.Settings.FileChooser.DateFormat">
+      <default>'regular'</default>
+      <summary>Date format</summary>
+      <description>
+        The amount of detail to show in the Modified column.
+      </description>
+    </key>
+  </schema>
+
+</schemalist>